package uk.ac.strath.cis.metric_spaces.distance;

public class ManhattanDistance extends PointDistance {

    /* (non-Javadoc)
     * @see uk.ac.strath.cis.rmoss.metric_spaces.distance.algorithms.PointDistance#algorithm(double, double, double)
     */
    @Override
    protected double algorithm(double sum, double n1, double n2) {
        return sum + Math.abs(n1 - n2);
    }

}
